from django.conf.urls import *
from mysite.cms.models import Story

info_dict = { 'queryset': Story.objects.all(), 'template_object_name': 'story' }

urlpatterns = patterns('django.views.generic.list_detail',
                       url(r'^(?P<slug>[-\w]+)/$', 'object_detail',
                           kwargs={
                               'queryset': Story.objects.all(),
                               'template_name': 'cms_story_detail.html'
                           },
                           name="cms-story"),
                       url(r'^$', 'object_list',
                           kwargs={
                               'queryset': Story.objects.all(),
                               'template_name': 'cms_story_list.html'
                           },
                           name="cms-home"),
                       )

urlpatterns += patterns('mysite.cms.views',
                        url(r'^category/(?P<slug>[-\w]+)/$', 'category', name="cms-category"),
                        url(r'^search/?$', 'search', name="cms-search"),
                        )